home *** CD-ROM | disk | FTP | other *** search
-
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
- /* */
- /* Prototype HP15C Calculator */
- /* James C. Ullrey */
- /* INRESCO */
- /* © 1990 */
- /* Version 13.97a */
- /* */
- /* PREY SEGMENT */
- /* */
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * **/
-
-
- /*****************************************************************/
- /* I N C L U D E S
- /*****************************************************************/
- #ifndef __C14__
- #include "PredatorPrey.h"
- #endif
- #include "create_prey.h"
- #include "calc_dork.h"
- #include "calc_contents.h"
- #ifndef __CIN__
- #include "calc_inits.h"
- #endif
- /********************************************************************/
- /* G L O B A L V A R I A B L E D E C L A R A T I O N S
- /********************************************************************/
- extern WindowPtr preyPtr;
- extern WindowPtr lastPtr;
-
- /*****************************************************************/
- /* P R O T O T Y P E S
- /*****************************************************************/
-
- void CreatePrey(void);
- void GetPreyBkgrnd(WindowPtr);
-
- /*****************************************************************/
- /*****************************************************************/
- /* */
- /* R O U T I N E S */
- /* */
- /*****************************************************************/
- /*****************************************************************/
-
-
- void prey_seg() {} /* for reference in "UnloadSeg()" calls */
-
- void GetPreyBkgrnd(WindowPtr wPtr)
- {
- Point mouse_pt;
- short type,k;
- WObjsHandle w_objs_hndl;
-
- //mouse_pt = an_event->where;
- w_objs_hndl = (WObjsHandle)GetWRefCon(wPtr);
- if((**w_objs_hndl).hasBackGround == TRUE)
- {
- if((**w_objs_hndl).hasTargets)
- type = T_BACKGRND_OBJ;
- else
- type = BACKGRND_OBJ;
- create_new_object(wPtr,mouse_pt,type);
- //if((**w_objs_hndl).isPrey)
- //{
- /*for(k = 0;k<6;k++)*/
- /* {*/
- /* Do_Plane_Control(wPtr,0,30,0,FALSE); /* rotate »*/
- /* }*/
- /* Do_Translation(wPtr,0,0,-200,FALSE);/* back off »*/
- //}
- }
- type = BARBIE; //(**w_objs_hndl).paletteSetting;
- create_new_object(wPtr,mouse_pt,type); /* calc_contents.c */
- ;
- }
-
- /************************** CreatePrey ***************************/
-
- void CreatePrey(void)
- {
- WindowPtr wPtr;
-
- if(lastPtr != NIL)
- {
- if((wPtr = get_window(3)) != NIL) /* get_window() ; in calc_inits.c */
- {
- ShowWindow(wPtr);
- SelectWindow(wPtr);
- preyPtr = wPtr;
- GetPreyBkgrnd(preyPtr);
- }
- }
- }
-
- /*********************** end of CreatePrey ***********************/
-
- void DoPreyMenu(short theItem)
- {
- switch(theItem)
- {
- case 1:
- CreatePrey();
- break;
- }
- }
-